package com.leyou.common.vo;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 分页结果对象
 * T  当前页的数据类型
 *
 * @author 虎哥
 */
@Getter
@Setter
public class PageResult<T> {
    private long total;
    private int totalPage;
    private List<T> items;

    public PageResult() {
    }

    public PageResult(Long total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    public PageResult(Long total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }
}
